package com.mkz.storage.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.mkz.core.common.constant.ServiceNameConstants;
import com.mkz.core.common.util.ResponseResult;
import com.mkz.storage.feign.factory.StorageClientFallbackFactory;

@FeignClient(contextId = "storageClient", value = ServiceNameConstants.STORAGE_SERVICE, fallbackFactory = StorageClientFallbackFactory.class)
public interface StorageClient {
	
	@PostMapping("deduct")
	public ResponseResult<Boolean> deduct(@RequestParam String commodityCode, @RequestParam Integer count);
}
